<?php

namespace App\Model;

class AreaModel extends BaseModel
{
    protected $table = 'area';
    protected $primaryKey = 'area_id';

    protected $fillable = [
        'name',
        'parentid',
        'level'
    ];


    public function childs()
    {
        return $this->hasMany(AreaModel::class,'parentid','area_id')->select(['area_id','name','parentid']);
    }
}
